package com.starlink.model.util;

import com.starlink.model.dtomapper.SchoolbagGroupBagDtoMapper;
import com.starlink.model.domain.SchoolbagGroupBagDO;
import com.starlink.model.vo.SchoolbagGroupBagVO;
import com.google.common.collect.Lists;
import org.apache.commons.collections4.CollectionUtils;

import java.util.ArrayList;
import java.util.List;

/**
 * @author zhanghong
 */
public class SchoolbagGroupBagConvert {

    public static List<SchoolbagGroupBagVO> buildSchoolbagGroupBagVoList(List<SchoolbagGroupBagDO> schoolbagGroupBagDOList) {
        if (CollectionUtils.isEmpty(schoolbagGroupBagDOList)) {
            return Lists.newArrayList();
        }
        List<SchoolbagGroupBagVO> schoolbagGroupBagVOList = new ArrayList<>();
        for (SchoolbagGroupBagDO schoolbagGroupBagDO : schoolbagGroupBagDOList) {
            schoolbagGroupBagVOList.add(SchoolbagGroupBagDtoMapper.INSTANCE.do2VO(schoolbagGroupBagDO));
        }

        return schoolbagGroupBagVOList;
    }
}
